<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta name="Content-Type" content="text/html; charset=UTF-8" />
<title>Class: Sass::Script::List</title>
<link rel="stylesheet" href="style.css" tppabs="http://sass-lang.com/docs/yardoc/css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="common.css" tppabs="http://sass-lang.com/docs/yardoc/css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '../..';
  if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="jquery.js" tppabs="http://sass-lang.com/docs/yardoc/js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="app.js" tppabs="http://sass-lang.com/docs/yardoc/js/app.js"></script>

  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="_index.html" tppabs="http://sass-lang.com/docs/yardoc/_index.html">Index (L)</a> &raquo; 
    <span class='title'><a href="Sass-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass.html" title="Sass (module)">Sass</a></span> &raquo; <span class='title'><a href="Script.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script.html" title="Sass::Script (module)">Script</a></span>
     &raquo; 
    <span class="title">List</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="javascript:if(confirm(%27http://sass-lang.com/docs/yardoc/Sass/Script/.  \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found.  \n\nDo you want to open it from the server?%27))window.location=%27http://sass-lang.com/docs/yardoc/Sass/Script/.%27" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  <a id="class_list_link" href="#">Class List</a>
  <a id="method_list_link" href="#">Method List</a>
  <a id ="file_list_link" href="#">File List</a>
</div>

      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: Sass::Script::List 
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName"><a href="Literal.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html" title="Sass::Script::Literal (class)">Literal</a></span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next"><a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Node</a></li>
          
            <li class="next"><a href="Literal.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html" title="Sass::Script::Literal (class)">Literal</a></li>
          
            <li class="next">Sass::Script::List</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">/var/www/sass-pages/.sass/lib/sass/script/list.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>A SassScript object representing a CSS list. This includes both comma-separated lists and space-separated lists.</p>

  </div>
</div>
<div class="tags">
  
</div><div id="subclasses">
  <h2>Direct Known Subclasses</h2>
  <p class="children"><a href="ArgList.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/ArgList.html" title="Sass::Script::ArgList (class)">ArgList</a></p>
</div>


  
  
  
  
  
  
  
  
  <h2>Instance Attribute Summary</h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#separator-instance_method" title="#separator (instance method)">- (Symbol) <strong>separator</strong> </a>
    

    
  </span>
  
  
    <span class="note title readonly">readonly</span>
    
  
  
  
  

  
    <span class="summary_desc">The operator separating the values of the list.</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#value-instance_method" title="#value (instance method)">- (Array&lt;Literal&gt;) <strong>value</strong> </a>
    

    
      (also: #children, #to_a)
    
  </span>
  
  
    <span class="note title readonly">readonly</span>
    
  
  
  
  

  
    <span class="summary_desc">The Ruby array containing the contents of the list.</span>
  
</li>

    
  </ul>


  <h2>Instance Method Summary</h2>

  <ul class="summary">
    
      <li class="protected ">
  <span class="summary_signature">
    
      <a href="#_perform-instance_method" title="#_perform (instance method)">- <strong>_perform</strong>(environment) </a>
    

    
  </span>
  
  
  <span class="note title protected">protected</span>
  
  

  
    <span class="summary_desc"></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#deep_copy-instance_method" title="#deep_copy (instance method)">- <strong>deep_copy</strong> </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc"></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#eq-instance_method" title="#eq (instance method)">- <strong>eq</strong>(other) </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc"></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (List) <strong>initialize</strong>(value, separator) </a>
    

    
  </span>
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  

  
    <span class="summary_desc">Creates a new list.</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#inspect-instance_method" title="#inspect (instance method)">- <strong>inspect</strong> </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc"></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#to_s-instance_method" title="#to_s (instance method)">- <strong>to_s</strong>(opts = {}) </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc"></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#to_sass-instance_method" title="#to_sass (instance method)">- <strong>to_sass</strong>(opts = {}) </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc"></span>
  
</li>

    
  </ul>

  
  
  
  
  
  <h3 class="inherited">Methods inherited from <a href="Literal.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html" title="Sass::Script::Literal (class)">Literal</a></h3>
  <p class="inherited"><a href="Literal.html#%3D%3D-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#%3D%3D-instance_method" title="Sass::Script::Literal#== (method)">#==</a>, <a href="Literal.html#assert_int%21-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#assert_int%21-instance_method" title="Sass::Script::Literal#assert_int! (method)">#assert_int!</a>, <a href="Literal.html#comma-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#comma-instance_method" title="Sass::Script::Literal#comma (method)">#comma</a>, <a href="Literal.html#div-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#div-instance_method" title="Sass::Script::Literal#div (method)">#div</a>, <a href="Literal.html#minus-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#minus-instance_method" title="Sass::Script::Literal#minus (method)">#minus</a>, <a href="Literal.html#neq-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#neq-instance_method" title="Sass::Script::Literal#neq (method)">#neq</a>, <a href="Literal.html#null%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#null%3F-instance_method" title="Sass::Script::Literal#null? (method)">#null?</a>, <a href="Literal.html#options-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#options-instance_method" title="Sass::Script::Literal#options (method)">#options</a>, <a href="Literal.html#plus-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#plus-instance_method" title="Sass::Script::Literal#plus (method)">#plus</a>, <a href="Literal.html#single_eq-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#single_eq-instance_method" title="Sass::Script::Literal#single_eq (method)">#single_eq</a>, <a href="Literal.html#space-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#space-instance_method" title="Sass::Script::Literal#space (method)">#space</a>, <a href="Literal.html#to_bool-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#to_bool-instance_method" title="Sass::Script::Literal#to_bool (method)">#to_bool</a>, <a href="Literal.html#to_i-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#to_i-instance_method" title="Sass::Script::Literal#to_i (method)">#to_i</a>, <a href="Literal.html#unary_div-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#unary_div-instance_method" title="Sass::Script::Literal#unary_div (method)">#unary_div</a>, <a href="Literal.html#unary_minus-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#unary_minus-instance_method" title="Sass::Script::Literal#unary_minus (method)">#unary_minus</a>, <a href="Literal.html#unary_not-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#unary_not-instance_method" title="Sass::Script::Literal#unary_not (method)">#unary_not</a>, <a href="Literal.html#unary_plus-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html#unary_plus-instance_method" title="Sass::Script::Literal#unary_plus (method)">#unary_plus</a></p>

  
  
  
  
  
  <h3 class="inherited">Methods inherited from <a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Node</a></h3>
  <p class="inherited"><a href="Node-1.html#dasherize-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html#dasherize-instance_method" title="Sass::Script::Node#dasherize (method)">#dasherize</a>, <a href="Node-1.html#opts-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html#opts-instance_method" title="Sass::Script::Node#opts (method)">#opts</a>, <a href="Node-1.html#perform-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html#perform-instance_method" title="Sass::Script::Node#perform (method)">#perform</a></p>
<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <p class="signature first" id="initialize-instance_method">
  
    - (<tt><a href="" title="Sass::Script::List (class)">List</a></tt>) <strong>initialize</strong>(value, separator) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>Creates a new list.</p>

  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='type'>(<tt>Array&lt;<a href="Literal.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html" title="Sass::Script::Literal (class)">Literal</a>&gt;</tt>)</span>
      
      
        <span class='name'>value</span>
      
      
      
        &mdash;
        See <tt><a href="#value-instance_method" title="Sass::Script::List#value (method)">#value</a></tt>
      
    </li>
  
    <li>
      
        <span class='type'>(<tt><a href="String.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/String.html" title="Sass::Script::String (class)">String</a></tt>)</span>
      
      
        <span class='name'>separator</span>
      
      
      
        &mdash;
        See <tt><a href="#separator-instance_method" title="Sass::Script::List#separator (method)">#separator</a></tt>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


22
23
24
25</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/list.rb', line 22</span>

def initialize(value, separator)
  super(value)
  @separator = separator
end</pre>
    </td>
  </tr>
</table>
</div>
  
</div>

  <div id="instance_attr_details" class="attr_details">
    <h2>Instance Attribute Details</h2>
    
      
      <span id=""></span>
      <span id="separator-instance_method"></span>
      <div class="method_details first">
  <p class="signature first" id="separator-instance_method">
  
    - (<tt>Symbol</tt>) <strong>separator</strong>  <span class="extras">(readonly)</span>
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>The operator separating the values of the list. Either <code>:comma</code> or <code>:space</code>.</p>

  </div>
</div>
<div class="tags">
  <h3>Returns:</h3>
<ul class="return">
  
    <li>
      
        <span class='type'>(<tt>Symbol</tt>)</span>
      
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


16
17
18</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/list.rb', line 16</span>

def separator
  @separator
end</pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id=""></span>
      <span id="value-instance_method"></span>
      <div class="method_details ">
  <p class="signature " id="value-instance_method">
  
    - (<tt>Array&lt;<a href="Literal.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html" title="Sass::Script::Literal (class)">Literal</a>&gt;</tt>) <strong>value</strong>  <span class="extras">(readonly)</span>
  

  
    <span class="aliases">Also known as:
    <span class="names"><span id='children-instance_method'>children</span>, <span id='to_a-instance_method'>to_a</span></span>
    </span>
  
</p><div class="docstring">
  <div class="discussion">
    <p>The Ruby array containing the contents of the list.</p>

  </div>
</div>
<div class="tags">
  <h3>Returns:</h3>
<ul class="return">
  
    <li>
      
        <span class='type'>(<tt>Array&lt;<a href="Literal.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Literal.html" title="Sass::Script::Literal (class)">Literal</a>&gt;</tt>)</span>
      
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


8
9
10</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/list.rb', line 8</span>

def value
  @value
end</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>


  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="_perform-instance_method">
  
    - <strong>_perform</strong>(environment)  <span class="extras">(protected)</span>
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
  <h3>See Also:</h3>
  <ul class="see">
    
      <li><a href="Node-1.html#_perform-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html#_perform-instance_method" title="Sass::Script::Node#_perform (method)">Node#_perform</a></li>
    
  </ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


68
69
70
71
72
73
74</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/list.rb', line 68</span>

def _perform(environment)
  list = Sass::Script::List.new(
    value.map {|e| e.perform(environment)},
    separator)
  list.options = self.options
  list
end</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="deep_copy-instance_method">
  
    - <strong>deep_copy</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
  <h3>See Also:</h3>
  <ul class="see">
    
      <li><a href="Node-1.html#deep_copy-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html#deep_copy-instance_method" title="Sass::Script::Node#deep_copy (method)">Node#deep_copy</a></li>
    
  </ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


28
29
30
31
32</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/list.rb', line 28</span>

def deep_copy
  node = dup
  node.instance_variable_set('@value', value.map {|c| c.deep_copy})
  node
end</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="eq-instance_method">
  
    - <strong>eq</strong>(other) 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
  <h3>See Also:</h3>
  <ul class="see">
    
      <li>Node#eq</li>
    
  </ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


35
36
37
38
39</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/list.rb', line 35</span>

def eq(other)
  Sass::Script::Bool.new(
    other.is_a?(List) && self.value == other.value &&
    self.separator == other.separator)
end</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="inspect-instance_method">
  
    - <strong>inspect</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
  <h3>See Also:</h3>
  <ul class="see">
    
      <li>Node#inspect</li>
    
  </ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


61
62
63</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/list.rb', line 61</span>

def inspect
  "(#{to_sass})"
end</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="to_s-instance_method">
  
    - <strong>to_s</strong>(opts = {}) 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  <h3>Raises:</h3>
<ul class="raise">
  
    <li>
      
        <span class='type'>(<tt><a href="SyntaxError.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></tt>)</span>
      
      
      
      
    </li>
  
</ul>

  <h3>See Also:</h3>
  <ul class="see">
    
      <li>Node#to_s</li>
    
  </ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


42
43
44
45</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/list.rb', line 42</span>

def to_s(opts = {})
  raise Sass::SyntaxError.new("() isn't a valid CSS value.") if value.empty?
  return value.reject {|e| e.is_a?(Null) || e.is_a?(List) && e.value.empty?}.map {|e| e.to_s(opts)}.join(sep_str)
end</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="to_sass-instance_method">
  
    - <strong>to_sass</strong>(opts = {}) 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
  <h3>See Also:</h3>
  <ul class="see">
    
      <li><a href="Node-1.html#to_sass-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html#to_sass-instance_method" title="Sass::Script::Node#to_sass (method)">Node#to_sass</a></li>
    
  </ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


48
49
50
51
52
53
54
55
56
57
58</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/list.rb', line 48</span>

def to_sass(opts = {})
  return "()" if value.empty?
  precedence = Sass::Script::Parser.precedence_of(separator)
  value.reject {|e| e.is_a?(Null)}.map do |v|
    if v.is_a?(List) && Sass::Script::Parser.precedence_of(v.separator) <= precedence
      "(#{v.to_sass(opts)})"
    else
      v.to_sass(opts)
    end
  end.join(sep_str(nil))
end</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Fri Mar  8 20:33:38 2013 by 
  <a href="javascript:if(confirm(%27http://yardoc.org/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?%27))window.location=%27http://yardoc.org/%27" tppabs="http://yardoc.org/" title="Yay! A Ruby Documentation Tool">yard</a>
  0.5.3 (ruby-1.8.7).
</div>


  <script type="text/javascript">
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  </script>
  <script type="text/javascript">
  try {
  var pageTracker = _gat._getTracker("UA-535380-8");
  pageTracker._trackPageview();
  } catch(err) {}</script>


  </body>
</html>